//
//  FrontView.m
//  IntelligentSunglasses
//
//  Created by bosma on 14-4-29.
//  Copyright (c) 2014年 cn.com.bosma. All rights reserved.
//

#import "FrontView.h"

@implementation FrontView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.backgroundColor = [UIColor whiteColor];
        
        UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        leftBtn.frame = CGRectMake(100, 200, 50, 50);
        [leftBtn setTitle: @"测试" forState:UIControlStateNormal];
        [leftBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [leftBtn addTarget:self action:@selector(leftBtnAction:) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:leftBtn];
        
    }
    return self;
}

- (void)leftBtnAction:(id)sender
{
    NSLog(@"中间按钮成功");
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
